<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class CultureVoice
 * *
 * @property $id  自增ID
 * @property $title  标题
 * @property $content  内容
 * @property $image  图片
 * @property $url  作品url
 * @property $publisher_uid  发布者uid
 * @property $created_at  
 * @property $updated_at  
 * @property $deleted_at  
 *
 * @package  App\Models
 * @mixin \Illuminate\Database\Eloquent\Builder
 */
class CultureVoice extends Model 
{
    use SoftDeletes;

    protected $table = 'culture_voice';

    protected $fillable = ['id', 'title', 'content', 'cover', 'type', 'duration', 'url', 'publisher_uid'];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

}